package com.bussiness.system.util;

/**
 *
 * @author xlr
 * @email liru@tengyue360
 * @date 2018-08-11 13:06:22
 */
public enum ResponseCode {
    SUCCESS(200, "SUCCESS"),
    ERROR(400, "ERROR"),
    NEED_LOGIN(10, "NEED_LOGIN"),
    ILLEGAL_ARGUMENT(2, "ILLEGAL_ARGUMENT"),

    CODE_ALREADY_USED(40005, "CODE_ALREADY_USED"),
    CREATE_ERROR(40015, "CREATE_ERROR"),
    CHECK_TOKEN_ERROR(40016, "CHECK_TOKEN_ERROR"),
    WAIT_TIME_OUT(40017, "WAIT_TIME_OUT"),
    NOT_SCAN(40018, "NOT_SCAN"),
    NO_USER_FOUND(40019, "NO_USER_FOUND"),
    CREATE_IDENTIFY_ERROR(40020, "CREATE_IDENTIFY_ERROR"),
    INVALID_CODE(40021, "INVALID_CODE"),
    LOGIN_FAULT(40022, "LOGIN_FAULT"),
    GET_SMS_ERROR(40023, "GET_SMS_ERROR"),
    CODE_TIMEOUT(40024, "CODE_TIMEOUT"),
    GET_CODE_ERROR(40025, "GET_CODE_ERROR"),
    USER_NOT_EXIST(40026, "USER_NOT_EXIST"),
    LOGOUT_ERROR(40027, "LOGOUT_ERROR"),
    PRINCIAL_PHONE_EXIST_ERROR(40030, "手机号已经存在，请确认手机号是否添加正确"),
    PRINCIAL_NAME_LENGTH_ERROR(50003, "PRINCIAL_NAME_LENGTH_ERROR"),
    PRINCIAL_MARK_TOO_LONG(50001, "描述超出500字"),
    CHECK_PHONE_ERROR(50002, "手机号错误");

    private final int code;
    private final String desc;

    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
